widget: Add default snapshot implementation
authorTimm Bäder <mail@baedert.org>
Wed, 3 May 2017 09:11:20 +0000 (11:11 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 20 Jul 2017 01:27:11 +0000 (21:27 -0400)
gtk_widget_snapshot will snapshot the css box, the default snapshot
vfunc now gtk_widget_snapshot_child's all child widgets.

gtk/gtkwidget.c

index 39c5498d858ba6708f14070f5d15456ec52f944f..b3293b34347b11248d693766faabc083c542618c 100644 (file)
@@ -940,7 +940,12 @@ static void
 gtk_widget_real_snapshot (GtkWidget   *widget,
                           GtkSnapshot *snapshot)
 {
-  /* nothing to do here */
+  GtkWidget *child;
+
+  for (child = _gtk_widget_get_first_child (widget);
+       child != NULL;
+       child = _gtk_widget_get_next_sibling (child))
+    gtk_widget_snapshot_child (widget, child, snapshot);
 }
 
 static void